<!--
		THIS EXAMPLE WAS DOWNLOADED FROM https://echarts.apache.org/examples/zh/editor.html?c=line-stack
		-->
<!DOCTYPE html>
<html style="height: 100%">
<head>
<meta charset="utf-8">
</head>
<body style="height: 100%; margin: 0">
<div id="container" style="height: 100%"></div>


<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/echarts@5/dist/echarts.min.js"></script>
<!-- Uncomment this line if you want to dataTool extension
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/echarts@5/dist/extension/dataTool.min.js"></script>
		-->
<!-- Uncomment this line if you want to use gl extension
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/echarts-gl@2/dist/echarts-gl.min.js"></script>
		-->
<!-- Uncomment this line if you want to echarts-stat extension
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/echarts-stat@latest/dist/ecStat.min.js"></script>
		-->
<!-- Uncomment this line if you want to use map
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/echarts@5/map/js/china.js"></script>
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/echarts@5/map/js/world.js"></script>
		-->
<!-- Uncomment these two lines if you want to use bmap extension
<script type="text/javascript" src="https://api.map.baidu.com/api?v=2.0&ak=<Your Key Here>"></script>
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/echarts@{{version}}/dist/extension/bmap.min.js"></script>
		-->

<script type="text/javascript">
		var dom = document.getElementById("container");
		var myChart = echarts.init(dom);
		var app = {};

		var option;



		option = {
		title: {
		text: '听力检测记录',
		subtext: '区域颜色的深浅度代表着听力受损的严重程度;Y轴代表着声音大小;X轴代表这频率大小;'
		},
		tooltip: {
		trigger: 'axis'
		},
		legend: {
		data: ['初测结果', '二测结果', '三测结果', '四测', '五测','六测']
		},
		grid: {
		left: '3%',
		right: '4%',
		bottom: '3%',
		containLabel: true
		},
		toolbox: {
		feature: {
		saveAsImage: {}
		}
		},
		xAxis: {
		type: 'category',
		boundaryGap: false,
		data: ['125', '250', '500', '1K', '2K', '3K', '4K', '6K', '8K']
		},
		yAxis: {
		type: 'value',
		inverse:true,
		axisLabel: {
		formatter: '{value} dB'
		},
		axisPointer: {
		snap: true
		}
		},
		series: [
		{
		type: 'line',
		// data: [null, 0, 0, 0, 0, 0, 0,0,0],
		markArea: {
		data: [
		[
		{
		name: '正常',
		yAxis: '0',
		itemStyle: {
		color: '#7bd9a5',
		},
		},
		{
		yAxis: '25'
		}
		],
		[
		{
		name: '轻度',
		yAxis: '25',
		itemStyle: {
		color: '#22c3aa'
		},
		},
		{
		yAxis: '40'
		}
		],
		[
		{
		name: '中度',
		yAxis: '40',
		itemStyle: {
		color: '#4ea397'
		},
		},
		{
		yAxis: '60'
		}
		],
		[
		{
		name: '重度',
		yAxis: '60',
		itemStyle: {
		color: '#999999'
		},
		},
		{
		yAxis: '80'
		}
		],
		[
		{
		name: '极重度',
		yAxis: '80',
		itemStyle: {
		color: '#666666'
		},
		},
		{
		yAxis: '130'
		}
		]
		]
		}
		},
		{
		name: '初测结果',
		type: 'line',
		data: [null, 45, 60, 105, 120, 115, 110,105,100]
		},
		{
		name: '二测结果',
		type: 'line',
		data: [null, 25, 35, 58, 80, 72, 65, 85, 100]
		},
		 {
		   name: '三测结果',
		   type: 'line',
		 //  stack: 'Total',
		   data: [null, 8, 0, 10, 65, 60, 66, 78, 95]
		 },
		 {
		   name: '四测',
		   type: 'line',
		//    stack: 'Total',
		   data: [null, 8, 0, 10, 65, 60, 55, 66, 80]
		 },
		{
		  name: '五测',
		  type: 'line',
		  data: [null, 7, 8, 10, 70, 65, 60, 65, 70]
		},
		{
		  name: '六测',
		  type: 'line',
		  stack: 'Total',
		  data: [null, 0, 0, 12, 70, 60, 55, 70, 85]
		}
		]
		};

		if (option && typeof option === 'object') {
		myChart.setOption(option);
		}

</script>
</body>
</html>
    